home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1997
/
HAM Radio 1997.iso
/
vcls
/
handles
/
unit1.pas
< prev
Wrap
Pascal/Delphi Source File
|
1996-04-08
|
4KB
|
140 lines
unit Unit1;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, ExtCtrls, StdCtrls, Handles;
type
TForm1 = class(TForm)
Label1: TLabel;
Button1: TButton;
Edit1: TEdit;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Panel1: TPanel;
Button5: TButton;
Handle1: TStretchHandle;
Handle2: TStretchHandle;
Handle3: TStretchHandle;
Handle4: TStretchHandle;
Handle5: TStretchHandle;
Button6: TButton;
procedure Button4Click(Sender: TObject);
procedure Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormClick(Sender: TObject);
procedure Button5MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Edit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Button6Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Handle3MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button4Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.Label1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Handle1.Attach(Label1);
end;
procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Handle2.Attach(Button1);
end;
procedure TForm1.Edit1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Handle3.Attach(Edit1);
end;
procedure TForm1.Panel1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
Handle5.Detach;
Handle4.Attach(Panel1);
end;
procedure TForm1.Button5MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{ or use the Child property }
Handle5.Child := Button5;
end;
procedure TForm1.FormClick(Sender: TObject);
begin
Handle1.Detach;
Handle2.Detach;
Handle3.Detach;
Handle4.Detach;
{ or use the Child property }
Handle5.Child := nil;
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
if Handle1.Attached then
Handle1.SetColors(clBlue, clFuchsia);
if Handle2.Attached then
Handle2.SetColors(clBlue, clFuchsia);
if Handle3.Attached then
Handle3.SetColors(clBlue, clFuchsia);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if Handle1.Attached then
Handle1.Locked := True;
if Handle2.Attached then
Handle2.Locked := True;
if Handle3.Attached then
Handle3.Locked := True;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if Handle1.Attached then
Handle1.Locked := False;
if Handle2.Attached then
Handle2.Locked := False;
if Handle3.Attached then
Handle3.Locked := False;
end;
procedure TForm1.Handle3MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Handle3.Attached then
Handle3.BringToFront;
end;
end.